package cn.edu.csust.cvs.management.common;

import com.alibaba.fastjson.annotation.JSONField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;

/**
 * @Auther: snail
 * @Date: 2021/1/22 00:30
 * @Description: 标准分页请求体
 */
@ApiModel("标准分页请求体")
@Data
public class PageQueryRequest {

    @ApiModelProperty(value = "当前页数", required = true,example = "1")
    @NotNull(message = "页数不能为空！")
    @JSONField(ordinal = 1)
    private int pageNo;

    @ApiModelProperty(value = "分页大小", required = true,example = "10")
    @NotNull(message = "分页大小不能为空！")
    @JSONField(ordinal = 2)
    private int pageSize;

    @ApiModelProperty(value = "排序字段")
    @JSONField(ordinal = 3)
    private String order;

    @ApiModelProperty(value = "升序or降序")
    @JSONField(ordinal = 4)
    private String sort;
}
